package com.zbkj.crmeb.chant.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zbkj.crmeb.chant.model.ChannelPartitionUser;

import java.math.BigDecimal;

public interface ChannelPartitionUserService extends IService<ChannelPartitionUser> {

    /**
     * 功能描述: 获取用户参与瓜分次数
     * @Param: [uid, partitionId]
     * @Return: java.lang.Integer
     * @Author: wangzh
     * @Date: 2023/6/13 10:27
     */
    Integer getUserPartitionTime(Integer uid, Integer partitionId);

    /**
     * 功能描述: 检查用户是否开过当前瓜分券的红包
     * @Param: [uid, partitionId]
     * @Return: java.lang.Boolean
     * @Author: wangzh
     * @Date: 2023/6/13 11:23
     */
    Boolean checkUserPartitionStatus(Integer uid, Integer partitionId);

    /**
     * 功能描述: 获取用户瓜分情况
     * @Param: [uid, partitionId]
     * @Return: com.zbkj.crmeb.chant.model.ChannelPartitionUser
     * @Author: wangzh
     * @Date: 2023/6/13 13:40
     */
    ChannelPartitionUser getPartitionUser(Integer uid, Integer partitionId);

    /**
     * 功能描述: 保存用户瓜分情况
     * @Param: [uid, partitionId, useCondition, partitionMoney, useType]
     * @Return: java.lang.Boolean
     * @Author: wangzh
     * @Date: 2023/6/13 16:08
     */
    Boolean saveUserPartition(Integer uid, Integer partitionId, BigDecimal useCondition, BigDecimal partitionMoney, Integer useType);
}
